<%@page pageEncoding="UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>

    <title>职位管理</title>

    <link href="../../css/mine.css" type="text/css" rel="stylesheet"/>
    <script type="text/javascript">
        function dels() {
            var fo = document.getElementById("fo");
            var method = document.getElementById("method");
            method.value="deletes";
            fo.submit();
        }
    </script>
</head>
<body>
<style>
    .tr_color {
        background-color: #9F88FF
    }
</style>
<div class="div_head">
            <span>
                <span style="float: left;">当前位置是：系统管理-》职位设置</span>
                <span style="float: right; margin-right: 8px; font-weight: bold;">
                    <a style="text-decoration: none;" href="/resouce/demo3/showMenuList">【添加】</a>
					<span onclick="dels()" style="color: blue;cursor: pointer">删除</span>
                </span>
            </span>
</div>
<div></div>
<div class="div_search">
            <span>
                <form action="/resouce/demo3/pageShow" method="post" id="fo">
                    职位名称:

					<input type="text" name="rname" value="${rname}"/>
					 所属部门: 
					<input type="text" name="dept" value="${dept}"/>
					是否启用: 
					<select name="rstate">
						<option value="">---请选择---</option>
						<option value="1" ${state==1?"selected":""}>是</option>
						<option value="2" ${state==2?"selected":""}>否</option>
					</select>
                    <input value="查询" type="submit"/>
					 <input type="hidden" id="method" name="method"/>

            </span>
</div>
<div style="font-size: 13px; margin: 10px 5px;">
    <table class="table_a" border="1" width="100%">
        <tbody>
        <tr style="font-weight: bold;">
            <td width="40px;">序号</td>
            <td width="30px;"><input type="checkbox"/></td>
            <td width="80px;"> 职位编码</td>
            <td>职位名称</td>
            <td width="120px;">所属部门</td>
            <td width="120px;">状态</td>
            <td align="center" width="100px;">操作</td>
        </tr>
        <c:forEach items="${info.list}" varStatus="i" var="role">
            <tr id="product1">
                <td>${i.count}</td>
                <td><input type="checkbox" value="${role.roleid}" name="roleids"/></td>
                <td>${role.rolenum}</td>
                <td><a href="view.html">${role.rname}</a></td>
                <td>${role.dept.deptname}</td>
                <td>${role.rstate}</td>
                <td>
                    <a href="/resouce/demo3/showBack?roleid=${role.roleid}">修改</a>
                    <a href="/resouce/demo3/deleterole?roleid=${role.roleid}">删除</a>
                </td>
            </tr>
        </c:forEach>
        </form>

        <tr>
            <td colspan="20" style="text-align: center;">
                <a href="/resouce/demo3/pageShow?index=1&rname=${rname}&state=${state}&dept=${dept}">首页</a>
                <a href="/resouce/demo3/pageShow?index=${info.prePage!=0?info.prePage:1}&rname=${rname}&state=${state}&dept=${dept}">上一页</a>
                <c:forEach begin="1" end="${info.lastPage}" var="i">
                    <a href="/resouce/demo3/pageShow?index=${i}&rname=${rname}&state=${state}&dept=${dept}">${i}</a>
                </c:forEach>
                <a href="/resouce/demo3/pageShow?index=${info.nextPage!=0?info.nextPage:info.pages}&rname=${rname}&state=${state}&dept=${dept}">下一页</a>
                (总共:${info.total}条,总共:${info.pages}页)
                <a href="/resouce/demo3/pageShow?index=${info.pages}&rname=${rname}&state=${state}&dept=${dept}">尾页</a>
            </td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>